<?
include_once("variables.php");
if($_SESSION['customer_id']!='') {
	$session_page = "customersession.php";
} else {
	$session_page = "session.php";
}
include_once($absolute_path.$session_page);
include_once("appointment.php");
$customerid = $_REQUEST['customer_id'];
$data = getCustomer($customerid);
$status = 0;
$msg = "Some Error has occured";
if($data->firstname=='') {
	$status = 0;
	$msg = "No customer found.";
} else {
	$status = 1;
	$msg='';
}

?>
<data>
	<status><?=$status?></status>
	<msg><?=$msg?></msg>
	<values><? 
	if($status == 1) {
	$fields = array("firstname","lastname","address",
					"city","state","zipcode","dayphone","eveningphone","email","cellphone");
	foreach($fields as $name) {
		echo "<$name>".$data->$name."</$name>\n";
	}
  }
 ?></values>
</data>
